﻿//=====================================================================================================
// LocalizationLibrary
// The Localization Library is a collection of reusable software components that provide 
// support for localization. This library enables you to localize WPF, Silverlight and WP7 applications.
// (http://localizationlibrary.codeplex.com)
//=====================================================================================================
// Author: Nicola Gallo (Website: www.nicola.gallo.name, Email: nicolagmt@hotmail.it) 
//=====================================================================================================

namespace LocalizationLibrary.Tests.Core
{
    //.NET References
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    
    // Microsoft References
    using Microsoft.VisualStudio.TestTools.UnitTesting;

    [TestClass]
    public class DynamicResourcesTableTest
    {
        [TestMethod]
        public void Register_New_DynamicResource()
        {
            DynamicResourcesTable dynamicResourceTable = new DynamicResourcesTable();

            DynamicResource dynamicResource = new DynamicResource(Guid.NewGuid().ToString());

            bool registered = dynamicResourceTable.Add(dynamicResource, false);
            Assert.AreEqual(registered, true);

            registered = dynamicResourceTable.Add(dynamicResource, false);
            Assert.AreEqual(registered, false);
        }
    }
}